#include "types/common.h"
#include "types/errors.h"

#ifndef _hash_h_
#define _hash_h_

/////////////////Template Declaration

#define ENTRY pair<Key,Value>

template <typename Key, typename Value, typename Traits>
class HashMap
{
public:
		HashMap();
		~HashMap();
		Value lookup (Key &k);
		void insert(Key &k, Value &v);
		void remove(Key &k);
		
		template<class Function>
		void foreach(Function fun);
		
private:
	Traits t;
	vector<ENTRY> entries;

	int lookup_entry (Key k);
};

#include "hash_impl.h" // Misusing include! Moved implementation to another clutter.

#endif
